function T = dynamic_g1_tt(T, y, x, params, steady_state, it_)
% function T = dynamic_g1_tt(T, y, x, params, steady_state, it_)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T             [#temp variables by 1]     double  vector of temporary terms to be filled by function
%   y             [#dynamic variables by 1]  double  vector of endogenous variables in the order stored
%                                                    in M_.lead_lag_incidence; see the Manual
%   x             [nperiods by M_.exo_nbr]   double  matrix of exogenous variables (in declaration order)
%                                                    for all simulation periods
%   steady_state  [M_.endo_nbr by 1]         double  vector of steady state values
%   params        [M_.param_nbr by 1]        double  vector of parameter values in declaration order
%   it_           scalar                     double  time period for exogenous variables for which
%                                                    to evaluate the model
%
% Output:
%   T           [#temp variables by 1]       double  vector of temporary terms
%

assert(length(T) >= 38);

T = M30hr.dynamic_resid_tt(T, y, x, params, steady_state, it_);

T(17) = (params(4)-1)*params(8)*1/y(7);
T(18) = (params(4)-1)*1/y(7);
T(19) = 1/y(5);
T(20) = getPowerDeriv(y(4),1-y(12),1);
T(21) = 1/y(4);
T(22) = (log(y(4))*T(20)+T(2)*T(21))/(y(12)-1)+T(20)/T(3);
T(23) = getPowerDeriv(y(4),(-y(12)),1);
T(24) = getPowerDeriv(y(14),1-y(15),1);
T(25) = 1/y(14);
T(26) = params(4)*params(8)*params(1)*((log(y(14))*T(24)+T(7)*T(25))/(y(15)-1)+T(24)/T(8));
T(27) = params(1)*getPowerDeriv(y(14),(-y(15)),1);
T(28) = getPowerDeriv(y(1),params(4),1);
T(29) = params(4)*getPowerDeriv(y(1),params(4)-1,1);
T(30) = (-y(13))/(y(5)*y(5));
T(31) = (params(4)-1)*params(8)*(-y(3))/(y(7)*y(7));
T(32) = (params(4)-1)*(-y(3))/(y(7)*y(7));
T(33) = getPowerDeriv(y(7),1-params(4),1);
T(34) = getPowerDeriv(y(7),(-params(4)),1);
T(35) = (-log(y(4)));
T(36) = ((y(12)-1)*log(y(4))*T(2)*T(35)-T(2)*log(y(4)))/((y(12)-1)*(y(12)-1))+(T(3)*T(2)*T(35)-(T(2)-1)*2*(y(12)-1))/(T(3)*T(3));
T(37) = (-log(y(14)));
T(38) = params(4)*params(8)*params(1)*(((y(15)-1)*log(y(14))*T(7)*T(37)-T(7)*log(y(14)))/((y(15)-1)*(y(15)-1))+(T(8)*T(7)*T(37)-(T(7)-1)*2*(y(15)-1))/(T(8)*T(8)));

end
